package main
import (
	"fmt"
	"encoding/json"
)
type student struct{
	Id int	`json:"id"`
	Name string	`json:"name"`
	Sex byte	`json:"sex"`
	Age int	`json:"age"`
	Chengji []float64	`json:"chengji"`
}
func main(){
	json1 := `{
 "id": 10001,
 "name": "ChenRui",
 "sex": 71,
 "age": 22,
 "chengji": [
  95,
  85,
  98.5,
  97.5
 ]
}`
	fmt.Println("json = ", json1)
	var st student
	err := json.Unmarshal([]byte(json1), &st)
	if err != nil{
		fmt.Println("err = ", err)
	}
	fmt.Println("st = ", st)
}
